package br.ucb.cm.config.page.integration.ui;

import javax.swing.JPanel;
import br.ucb.cm.config.bean.Config;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;

public class IntegrationPageUI extends JPanel {
	private static final long serialVersionUID = 1L;
	
	private IfcIntegrationPageUI controller; 
	private IntegrationUI panel;

	public IntegrationPageUI(IfcIntegrationPageUI controller) {
		this.controller = controller;
		
		panel = new IntegrationUI();
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(10)
					.addComponent(panel, GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
					.addGap(10))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(11)
					.addComponent(panel, GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
					.addGap(11))
		);
		setLayout(groupLayout);
		
	}

	public IfcIntegrationPageUI getController() {
		return controller;
	}

	public void setController(IfcIntegrationPageUI controller) {
		this.controller = controller;
	}

	public Object getValue() {
		return panel.getValue();
	}

	public void setConfig(Config config) {
		panel.setConfig(config);
	}

	public boolean isEmpty() {
		return panel.isEmpty();
	}
}